package com.aidex.biz.domain;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 还款信息明细对象 biz_loan_bill_detail
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-07-03
 */
@Data
public class LoanBillDetail extends BaseEntity<LoanBillDetail> {
    private static final long serialVersionUID = 1L;


    /**
     * 主表ID
     */
    private String loanId;

    /**
     * 期数
     */
    @Excel(name = "期数")
    private Integer period;

    /**
     * 本金金额
     */
    @Excel(name = "本金金额")
    private BigDecimal principal;

    /**
     * 利息
     */
    @Excel(name = "利息")
    private BigDecimal interest;

    /**
     * 月供金额
     */
    @Excel(name = "月供金额")
    private BigDecimal monthPayment;

    /**
     * 剩余本金
     */
    @Excel(name = "剩余本金")
    private BigDecimal remainingPrincipal;

    /**
     * 是否逾期
     */
    @Excel(name = "是否逾期", dictType = "sys_yes_no")
    private Integer isOverdue;

    /**
     * 逾期天数
     */
    @Excel(name = "逾期天数")
    private Integer overdueDays;

    /**
     * 逾期说明
     */
    @Excel(name = "逾期说明")
    private String overdueRemark;
    /**
     * 还款日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "还款日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payDate;
    /**
     * 排序
     */
    private Integer sort;

    /**
     * 状态（0正常 1 停用）
     */
    private String status;


    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public Integer getPeriod() {
        return period;
    }

    public void setPeriod(Integer period) {
        this.period = period;
    }

    public BigDecimal getPrincipal() {
        return principal;
    }

    public void setPrincipal(BigDecimal principal) {
        this.principal = principal;
    }

    public BigDecimal getInterest() {
        return interest;
    }

    public void setInterest(BigDecimal interest) {
        this.interest = interest;
    }

    public BigDecimal getMonthPayment() {
        return monthPayment;
    }

    public void setMonthPayment(BigDecimal monthPayment) {
        this.monthPayment = monthPayment;
    }

    public BigDecimal getRemainingPrincipal() {
        return remainingPrincipal;
    }

    public void setRemainingPrincipal(BigDecimal remainingPrincipal) {
        this.remainingPrincipal = remainingPrincipal;
    }

    public Integer getIsOverdue() {
        return isOverdue;
    }

    public void setIsOverdue(Integer isOverdue) {
        this.isOverdue = isOverdue;
    }

    public Integer getOverdueDays() {
        return overdueDays;
    }

    public void setOverdueDays(Integer overdueDays) {
        this.overdueDays = overdueDays;
    }

    public String getOverdueRemark() {
        return overdueRemark;
    }

    public void setOverdueRemark(String overdueRemark) {
        this.overdueRemark = overdueRemark;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("deptId", getDeptId())
                .append("userName", getUserName())
                .append("deptName", getDeptName())
                .append("companyId", getCompanyId())
                .append("loanId", getLoanId())
                .append("period", getPeriod())
                .append("principal", getPrincipal())
                .append("interest", getInterest())
                .append("monthPayment", getMonthPayment())
                .append("remainingPrincipal", getRemainingPrincipal())
                .append("isOverdue", getIsOverdue())
                .append("overdueDays", getOverdueDays())
                .append("overdueRemark", getOverdueRemark())
                .append("sort", getSort())
                .append("status", getStatus())
                .append("remark", getRemark())
                .append("id", getId())
                .append("createBy", getCreateBy())
                .append("createDept", getCreateDept())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("updateIp", getUpdateIp())
                .append("version", getVersion())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
